package com.dayuanit.pay.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.stereotype.Service;

import com.dayuanit.pay.service.RedisService;
import com.dayuanit.pay.util.JedisUtil;

@Service
public class RedisServiceImpl implements RedisService {
	private final static Logger logger = LoggerFactory.getLogger(RedisServiceImpl.class);

	 @Resource(name="redisTemplate")
	 private ListOperations<String, String> orderQueue;
	 
	@Override
	public void addPayedOrder(String value) {
		String key = "dayuanit:pay:order";
		long length = orderQueue.leftPush(key, value);
		
		logger.info("支付订单通知队列长度{}", length);
	}

}
